<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Http\Requests\ConfigRequest;
use Illuminate\Http\Request;
use App\Admin\Config;

class ConfigController extends Controller
{

    public function index()
    {
        $data = Config::first();
        return view('admin.config', compact('data'));
    }

    public function update(ConfigRequest $request)
    {
        $data = $request->except('_token');
        return Config::first()->update($data);
    }
}
